    <div class="SipeiMain_r fr">
      <h2 class="clearfix fonts_18 height45 fontc_444">通知</h2>
      <div class="clearfix back_bgf border_3 border_c fontc_666 SipeiNotice height20">        
        <?php if(!empty($data)): ?>
          	<?php foreach ($data as $value): ?>          	
        <?php if (!empty($value['notice'])):?>
        <div class="m_hr_b noticeB">
         <h1 class="clearfix fonts_18 fontc_333 pt10 pb10 height20"><?php echo isset($value['exam_term_name'])?$value['exam_term_name']:''; ?></h1>
        	<?php foreach ($value['notice'] as $nv):?>        	 
        <div class="clearfix  mb20 noticeList">
          <div class="fl NoticeLeft">
            <ul class="clearfix fontc_FFF text_align"  style="background:#01c597;">
              <li class="m_hr_b"><?php echo date('Y.m',$nv['time_created']); ?></li>
              <li style="background:#f2f2f2;" class="fonts_18 fontw_bold height30 fontc_666"><?php echo date('d',$nv['time_created']); ?></li>
            </ul>
          </div>
          <div class="fl NoticeRight">
            <h3 class="clearfix fonts_16 pb10">
                <font class="fl">
                <?php echo $nv['notice_name']; ?>
                </font>
                <?php if(!empty($nv['file'])): ?>
                <img src="/themes/default/images/Sipei/Notice.png" class="fl pt2 pl5" />
                <?php endif; ?>
            </h3>
            <p class="clearfix">
                <img src="/themes/default/images/Sipei/time.png" class="fl pt2 pr3" />
                <font class="fl fontc_bbb">	            
                <?php echo date('Y年m月d日 h:i',$nv['time_created']);?></font><img src="/themes/default/images/Sipei/Person.png" class="fl pt2 pr3 pl20" /><font class="fl fontc_bbb"><?php echo $nv['username']; ?></font>
            </p>
            <div class="clearfix pt4 fontc_333">
            	<?php echo (!empty($nv['notice_comment'])) ? Func::get_word(strip_tags($nv['notice_comment']), 240) : $nv['notice_comment']; ?>
            </div>
            <p class="clearfix">
            	<a href="<?php echo $this->createUrl('info',array('notice_id'=>$nv['notice_id'])); ?>">
            	<font class="fontc_999">阅读全部<strong class="fonts_16 pl4">></strong></font>
            	</a>
            </p>
          </div>          
        </div>  
        <?php endforeach; ?>
          </div>
           <?php endif; ?> 
         
             <?php endforeach; ?>
         <?php else: ?>
         <h1 align="center">暂无数据</h1>
          <?php endif; ?>
      </div>      
    </div>
    <style>
    	.moreList_btn{
            width: 100%;
            height: 30px;
            text-align: center;
            display: block;
            background: #eee;
            line-height: 30px;
            color: #666;
            margin-bottom: 20px;
            margin: 0 auto;
            margin-bottom: 20px;
            border-radius:5px;
    	}
    </style>
<script>
$(function(){
	$( ".noticeB" ).each(function(){
		var $this = $(this),
			noticeList = $this.find(".noticeList"),
			noticeList_len = noticeList.length;
		if( noticeList_len>3 ){
			noticeList.eq( 2 ).nextAll( ".noticeList" ).hide();
			var moreList_btn = $(document.createElement( "a" )).addClass("moreList_btn");
			moreList_btn.attr("href","javascript:;");
			moreList_btn.text("显示更多");
			moreList_btn.bind("click",function(){
				if( $this.find(".noticeList:hidden").length > 0 ){
					$this.find(".noticeList:hidden").slideDown();
					moreList_btn.text("收起");
				}else{
					noticeList.eq( 2 ).nextAll( ".noticeList" ).slideUp();
					moreList_btn.text("显示更多");
				}
			})
			$this.append( moreList_btn );
		}
	})
})
</script>